import { createRouter, createWebHistory } from 'vue-router'
import CodeEditor from '../components/CodeEditor.vue'
import ScriptList from '../components/ScriptList.vue'
import {defineAsyncComponent, defineComponent} from "vue";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'list',
      component: ScriptList
    },
    {
      path: '/editor/:id?',
      name: 'editor',
      component: CodeEditor
    },
    {
      path: '/javaI18n',
      name: 'javaI18n',
      component: defineAsyncComponent(() => import('../views/javaI18n.vue'))
    }
  ]
})

export default router
